#ifndef LINKREGION_INC
#define LINKREGION_INC

#include <vector>
#include "tp5Region.h"

using std::vector;

namespace Torch {

class Link
{
public:
	//Parametre de la liaison
	int m_iMu,m_iSigma,m_iNbPixel;			
		
	int m_iLabel1,m_iLabel2;
	//label des 2 regions
	Region *m_R1,*m_R2;		
	
	int getMean(){return this->m_iMu;}

	//region qui constituent la liaion
	Link(Region *region1,Region *region2);
	int getSigma(){return this->m_iSigma;}
	Region*	getRegion1(){return this->m_R1;}
	Region*	getRegion2(){return this->m_R2;}

	// revoie l'identifiant de la region 1
	int getLabelR1(){return this->m_iLabel1;} 
	// revoie l'identifiant de la deuxieme region
	int getLabelR2(){return this->m_iLabel2;}
	
	void getParameters(int *iMu,int *iSigma,int *iNbPixel);
	void setLink(int iChoice,Region *region);	

	//Supprime "iRegionASupprimer" de la liste des voisins
	void supVoisin(bool bChoice,int iRegionASupprimer);

	//met a jour la laison en recalculant sigma et mu 
	void upDate();

	};

}

#endif /* IMAGETP5REGION_H_ */
